The useCountOfCollectables hook returns the number of NFTs in a collection.
import { OrderSide } from '@0xsequence/marketplace-sdk';
import { useCountOfCollectables } from '@0xsequence/marketplace-sdk/react';
const countOfCollectables = useCountOfCollectables({
chainId,
collectionAddress,
side: OrderSide.listing,
filter: {
searchText: text,
includeEmpty,
properties,
},
});
Show child attributes
interface UseCountOfCollectables {
chainId: ChainId;
collectionAddress: CollectionAddress;
query?: { enabled?: boolean };
filter?: {
includeEmpty: boolean;
searchText?: string;
properties?: {
name: string;
type: PropertyType;
min?: number;
max?: number;
values?: any[];
}[];
marketplaces?: MarketplaceKind[];
inAccounts?: string[];
notInAccounts?: string[];
ordersCreatedBy?: string[];
ordersNotCreatedBy?: string[];
};
side?: OrderSide;
}
Was this page helpful?